package oj;

import java.util.Scanner;

public class Day2S {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String s = scanner.nextLine();
            String[] str = s.split(" ");
            StringBuilder sb = new StringBuilder();
            for (int i = str.length - 1; i >= 0; i--) {
                sb.append(str[i]).append(" ");
            }
            System.out.println(sb.toString());
        }
    }
}
